package com.liujit.generator.engine.config;

import lombok.Data;

/**
 * @Description Mapper模板生成的配置
 * @Author LiuJun
 * @Date 2020/8/13 2:40 下午
 */
@Data
public class MapperConfig {

    private ContextConfig contextConfig;

    private String templatePath;

    public void init(ContextConfig contextConfig) {
        this.contextConfig = contextConfig;
        this.templatePath = "\\{}" + contextConfig.getReqFrom() + "serve\\{}" + contextConfig.getReqFrom()
                + "api\\src\\main\\java\\" + contextConfig.getPackageName().replaceAll("\\.", "\\\\")
                + "\\mapper\\{}Mapper.java";
    }
}
